Skip to content

Conversation

jonasbjurel
Copy link

In some cases you do not want the Log object to be instantiated automatically by the library.
Reasons could be that you want to control the heap memory segment type that gets allocated for the log object, or that you want to inherit the log base to another derived class.
This commit adds a flag "DO_NOT_INSTANTIATE" that if set omits the automatic instantiation.
The change is backwards compatible.

thijse and others added 29 commits May 22, 2021 14:22
Make ArduinoLog work on  native (x86_64) environments for testing
- Added PGM stubs
- Use Arduino.h in most cases
Explanation printable object in README.md
Renamed basic example
Updated & cleaned up examples
… "Don't cast the va_arg for __FlashStringHelper* or char* because it crashes on x86"
This avoids  error: '_logOutput' was not declared in this scope when DISABLE_LOGGING is defined.
Private _logOutput conditional compilation when DISABLE_LOGGING
Fix: clearSuffix was clearing the prefix instead of the suffix
Fix: clearSuffix was clearing the prefix
In some cases you do not want the Log object to be instantiated automatically by the library.
Reasons could be that you want to control the heap memory segment type that gets allocated for the log object, or that you want to inherit the log base to another derived class.
This commit adds a flag "__DO_NOT_INSTANTIATE__" that if set omits the automatic instantiation.
The change is backwards compatible.
@jonasbjurel jonasbjurel marked this pull request as ready for review August 16, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.